package com.xiaoxiaoxt.xiaoxiaoxtdao.mapper;

import com.xiaoxiaoxt.xiaoxiaoxtdao.entity.PaperGroupQuestionScantron;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public interface PaperGroupQuestionScantronMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PaperGroupQuestionScantron record);

    int insertSelective(PaperGroupQuestionScantron record);

    PaperGroupQuestionScantron selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PaperGroupQuestionScantron record);

    int updateByPrimaryKeyWithBLOBs(PaperGroupQuestionScantron record);

    int updateByPrimaryKey(PaperGroupQuestionScantron record);

    ArrayList<PaperGroupQuestionScantron> selectListByPaperIdVersionOrderBySortForScantron(@Param("paperId") Integer paperId, @Param("mid") Integer mid, @Param("version") Integer version);

    ArrayList<PaperGroupQuestionScantron> selectListByPaperIdVersionOrderBySort(@Param("paperId") Integer paperId, @Param("version") Integer verision);

    int insertScantronByList(@Param("list") ArrayList list);

    int countScantronByPaperIdVersion(@Param("paperId") Integer paperId, @Param("version") Integer version);

    int updateStyleByPaperIdBatch(@Param("paperId") Integer paperId, @Param("version") Integer version, @Param("list") List<HashMap<String, String>> list);

    Integer getLastVersion(@Param("paperId") Integer paperId);
}